home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / mini / Win95+Win+Linux < prev    next >
Text File  |  1996-08-17  |  14KB  |  319 lines

  1.  
  2.                 Windows 95 + Windows 3.x + Linux Howto
  3.              Robert Goodwin <Robert.Goodwin@mcc.ac.uk>
  4.                             August 1996
  5.  
  6.   0. Introduction
  7.  
  8.   This document was originally written in Jan96. I have incorporated
  9.   various comments, information, and questions received since then.
  10.   This document is also avilable in Japanese; see the collection of
  11.   Japanese linux docs at http://epsenewsc.gee.kyoto-u.ac.jp/JF/JF.html
  12.  
  13.   1. Booting Multiple Operating Systems
  14.  
  15.   If you want to boot multiple operating systems (and you don't want
  16.   to have to boot them from floppy disk!), you need to use some
  17.   sort of BOOT MANAGER.
  18.  
  19.   Win95 doesn't really *have* a boot manager - it has boot options,
  20.   but in my book a "boot manager" can be configured to boot anything.
  21.  
  22.   Lilo can be configured to boot almost anything, as can the OS/2
  23.   boot manager and the Windows NT boot manager. Which of these you
  24.   use is really up to you; it depends what you want on your system.
  25.   If you use the OS/2 manager, for example, it "hides" the "other"
  26.   DOSsy partitions from you.
  27.  
  28.  
  29.   2. Other Places You Might Look
  30.  
  31.   If you just want Win95 and Linux, then you probably want the
  32.   Win95+Linux Howto. The latest version can be found at:
  33.  
  34.        http://www.in.net/~jkatz/win95/Linux-HOWTO.html
  35.  
  36.   Win95 and Linux can be installed on a single drive; the problems
  37.   covered in the rest of this document revolve around DOS not allowing
  38.   more than ONE primary DOS partition per drive.
  39.  
  40.   If you want to use the NT boot manager, take a look at 
  41.   http://www.bcpl.lib.md.us/~dbryan/directboot.html
  42.   To add Linux (or others, including OS/2), there's a nifty little
  43.   program that makes boot sector files for use with the NT loader.
  44.   You can find information about this at
  45.   http://ourworld.compuserve.com/homepages/gvollant/othertl.htm
  46.  
  47.   You might also investigate LOADLIN.EXE which allows you to "boot"
  48.   Linux by first booting into DOS.
  49.  
  50.  
  51.   3. Why this HOWTO?
  52.  
  53.   This document addresses the following issues:
  54.  
  55.   * How to get Win 3.x to live on the same machine as Win95 without
  56.     problems (and what those problems might otherwise be)
  57.   * How to avoid problems on a machine with Win95 which can also
  58.     remote boot DOS
  59.   * How to install Win95 with Linux without having to reinstall lilo
  60.     (with the tedious booting of Linux from floppy)
  61.  
  62.   Although the Win95 filesystem lives on top of the standard DOS FAT,
  63.   it does some pretty unpleasant things to it. Boot your Win95 machine
  64.   from a bootable DOS floppy and get Norton to check the disk (but
  65.   DON'T let it attempt any repairs or you'll mess up some "long"
  66.   filenames)
  67.  
  68.   I am currently required to support applications in the Win95
  69.   environment as well as under Win3.x (both run locally and network
  70.   booted). I developed the setup described in this document to allow me
  71.   to do all this with just one PC.
  72.  
  73.   Don't ask how a Unix person ended up in this position :-)
  74.  
  75.  
  76.   4. Requirements
  77.  
  78.   If you are prepared to tinker with the source to lilo (lilo 1.7
  79.   or later, I belive), it is possible to do all this with ONE
  80.   hard disk. This works by changing the contents of the partition
  81.   table as the system boots; if you don't feel confident about trying
  82.   this, then don't!
  83.  
  84.   Otherwise, you will need TWO hard disks. This is due to some
  85.   DOS/Windows limitations with respect to booting and allocation of
  86.   drive letters. Believe me, I tried to get it working with one.
  87.   (but I didn't want to mess with the lilo source)
  88.  
  89.  
  90.   5. What you will end up with
  91.  
  92.   A word on device names. I have seen systems which use /dev/hdc for
  93.   the 3rd IDE disk (first IDE disk on secondary controller) and
  94.   /dev/hdd for the fourth. I've also seen systems which use /dev/hd1a
  95.   and /dev/hd1b (giving such partitions as /dev/hd1a3 etc). My system
  96.   uses this second naming style, but I have changed to names to
  97.   /dev/hdc and /dev/hdd to minimise confusion.
  98.  
  99.   Here is a brief description of what I now have - watch those drive
  100.   letters because they change...
  101.  
  102.   If you use a secondary IDE controller, you may need to create the
  103.   /dev entries yourself (/dev/hdcd* and /dev/hdd*) This might be the
  104.   case if you add a second hard drive to a machine with one IDE disk
  105.   and an IDE CDROM already installed; your second hard disk would be
  106.   /dev/hdc. I have tried this arrangement with no problems.
  107.  
  108.   I have: /dev/hda  - first hard disk
  109.           /dev/hdb  - cd-rom drive
  110.           /dev/hdc  - second hard disk
  111.  
  112.   Option 1:
  113.     On powering up the machine, I can allow the boot ROM on the
  114.     ethernet card to remote boot DOS. The "C" drive is the first DOS
  115.     partition on the FIRST IDE disk (in my case /dev/hda1). The "D"
  116.     drive is the first DOS partition on the SECOND IDE disk (in my
  117.     case /dev/hdc1), and the "E" drive is the second DOS partition on
  118.     the SECOND IDE disk (/dev/hdc2). The CD-ROM becomes F:
  119.  
  120.   Option 2:
  121.     Allow lilo to boot the default system (Linux, naturally)
  122.  
  123.   Option 3:
  124.     Interrupt lilo and ask for an option I call DOS. This boots DOS
  125.     from /dev/hda1, and, as with option 1, the "C" drive is /dev/hda1
  126.     the "D" drive is /dev/hdc1 and the "E" drive is /dev/hdc2. The
  127.     CD-ROM becomes F:
  128.  
  129.   Option 4:
  130.     Interrupt lilo and ask for an option I call Win95. This boots
  131.     Win95 from the first DOS partition on the SECOND IDE drive (in
  132.     my case /dev/hdc1). Follow this carefully: the "C" drive is now
  133.     the first DOS partition on the SECOND IDE disk (/dev/hdc1),
  134.     the "D" drive is now the first DOS partition on the FIRST IDE
  135.     disk (/dev/hda1), and the "E" drive remains the second DOS
  136.     partition on the SECOND IDE disk (/dev/hdc2). The CD-ROM
  137.     becomes F:
  138.  
  139.   Notice that the C drive changes depending how you boot. This means
  140.   that when you install Win95, you install it to C:\WINDOWS, and when
  141.   you install Win3.x, you install it to C:\WINDOWS but this isn't the
  142.   same place :-)
  143.  
  144.   Also notice that the third DOS partition (which I use as a general
  145.   data drive) is E: whichever way you boot, and that the CD-ROM
  146.   stays constant too.
  147.  
  148.  
  149.   6. How to do it
  150.  
  151.   First of all, install Linux;  it does not matter which drive you
  152.   install it on; but since you are using two drives it makes sense to
  153.   create a swap partition on each.
  154.  
  155.   Create a primary DOS partition on the second disk. Unfortunately, the
  156.   DOS FDISK won't let you do this, so you must use the Linux fdisk to
  157.   create the partition, set the type (6 for DOS 16 BIT FAT > 32Mb), set
  158.   the partition as bootable, and CAREFULLY follow the advice on the man
  159.   page for fdisk. This describes how to persuade DOS to recognise a
  160.   partition created in this manner using the dd command to zero the
  161.   first 512 bytes of the partition. (Basically, you use
  162.   "dd if=/dev/zero of=/dev/XXXX bs=512 count=1" where XXXX is the
  163.   device but be VERY careful since this is a good way to trash a disk
  164.   - for example by putting /dev/hda instead of /dev/hda1!)
  165.  
  166.   Creating the primary DOS partition on the first hard disk can be done
  167.   with the DOS FDISK. Any other required DOS partitions can similarly
  168.   be created.
  169.  
  170.   Both of these primary partitions must be formatted as bootable DOS
  171.   partitions; use FORMAT C: /S and FORMAT D: /S having booted from a
  172.   floppy. In order to avoid confusion, give the partitions meaningful
  173.   volume labels!
  174.  
  175.   Edit /etc/lilo.conf to give you the option of booting from either
  176.   of the two primary DOS partitions. I have appended an example
  177.   to the end of this document. Note the use of the "loader" line in
  178.   this example file.  Which you choose to install as Win95 and which
  179.   as DOS/Win3.x is up to you; I used the second hard disk for Win95
  180.   since network booting of the machine then gives the normal DOS
  181.   drive as "C". Also (and usefully), installing Win95 on the second
  182.   hard disk avoids having to boot linux from a recovery disk and
  183.   re-install lilo (why this should be is explained below). Remember
  184.   to run lilo to install the options.
  185.  
  186.   If you are (sensibly) planning to install Win95 from CDROM, you
  187.   will need to include the relevant drivers on the Win95 partition
  188.   such that when you boot from it, the CDROM drive will be accessible.
  189.  
  190.   Now boot, using lilo, from the drive you wish to use for DOS/Win3.x
  191.   and install the rest of DOS and Win3.x - the Windows installation
  192.   should go to the C:\WINDOWS directory as per default.
  193.  
  194.   Once this is done, reboot the machine and, using lilo, boot from the
  195.   Win95 partition. Perform your Win95 installation. The installation
  196.   procedure may suggest D:\WINDOWS for installing Win95 because it
  197.   searches the machine for existing WINDOWS versions - DON'T accept
  198.   this - install Win95 to C:\WINDOWS.
  199.  
  200.   Now for the neat part! Win95 is a rather arrogant system - when you
  201.   install it, it assumes that it is the only operating system on the
  202.   machine and proceeds to write its own MBR (Master Boot Record) to
  203.   the hard disk. This is why you generally need to re-install lilo.
  204.   If you have installed Win95 to the second hard disk, you have done
  205.   something which the Microsoft(tm) programmers didn't consider.
  206.   On one machine where I performed this operation, Win95 wrote its
  207.   replacement MBR to the MBR of the SECOND hard disk. On another, I
  208.   never found any evidence of it at all. The practical upshot of this
  209.   is that the MBR which matters, that of the first hard disk, is
  210.   not disturbed. Thus when you reboot the machine, you will be greeted
  211.   by the friendly and familiar LILO prompt.
  212.  
  213.   Example Partition List:
  214.   /dev/hda1  *   DOS partition  (C: or D: depending upon boot)
  215.   /dev/hda2      Extended partition
  216.   /dev/hda5      /
  217.   /dev/hda6      swap
  218.   /dev/hda7      /home
  219.  
  220.   /dev/hdc1  *   Win95 partition  (C: or D: depending upon boot)
  221.   /dev/hdc2      DOS partition    (E: always)
  222.   /dev/hdc3      swap
  223.  
  224.   (Partitions with a * are set as bootable (or "active") by fdisk)
  225.  
  226.   Example lilo.conf:
  227.   # /etc/lilo.conf
  228.   install = /boot/boot.b
  229.   compact
  230.   delay = 20    # optional, for systems that boot very quickly
  231.   #prompt               # use instead of delay to force response to boot prompt
  232.   #vga = normal # force sane state
  233.   #ramdisk = 0  # paranoia setting
  234.   #root = current       # use "current" root
  235.   boot = /dev/hda
  236.   image = /boot/vmlinuz
  237.     read-only
  238.     label = linux
  239.   other = /dev/hdc1
  240.     label = win95
  241.     loader= /boot/any_d.b
  242.   other = /dev/hda1
  243.     table = /dev/hda
  244.     label = dos
  245.   image = /boot/vmlinuz.old
  246.     label = linux.old
  247.     optional
  248.     read-only
  249.  
  250.  
  251.  
  252.   7. Some Questions and Answers
  253.  
  254.   Q: Does this scheme work for SCSI disks?
  255.   A: I have been told that this works, but have not been able to try it
  256.      for myself
  257.  
  258.   Q: Does this scheme work if Linux is wholly on one disk, and DOS and 
  259.      Win 95 are partitions of the other?
  260.   A: No - the DOS and Win95 bits both have to be the primary "DOS"
  261.      partition of a disk. It is possible to get round this by
  262.      recompiling LILO
  263.  
  264.   Q: I have downloaded a Win95 FAQ which speaks of the ability to boot
  265.      between DOS and Win95. If I install Win3.11 in a different directory
  266.      from "windows" it says I can run Win95 and Win3.11 in harmony. This
  267.      is one partition.
  268.   A: Yes, this can be done. It may cause problems however. Win95 does
  269.      some nasty things to the FAT drive and some operations you perform
  270.      under your old DOS and old windows (3.x) can easily destroy the
  271.      long-filename information. For example, defragmenting the drive using
  272.      a DOS/Win3.x utility will do this. You are also introducing
  273.      difficulties for yourself when things don't work; you have to worry
  274.      about the INI files under each system *and* the win95 registry.
  275.  
  276.   Q: Does LBA matter?
  277.   A: Yes. Ugh!
  278.      BIOS's after approx 1994 support LBA to get around a limit somewhere
  279.      inside DOS which prevents DOS from being able to cope with cylinder
  280.      numbers > 1024. (This is covered in much greater detail in PC hardware
  281.      FAQs). LBA fiddles the disk geometry, multiplying the number of heads
  282.      by 2 or 4 (etc) in order to divide the aparent number of cylinders by
  283.      2 or 4 (etc) to a number < 1024. This works around this limit.
  284.      
  285.      Linux can handle cylinders > 1024 (provided that the partition from
  286.      which you boot is wholly below 1024 cylinders), so can handle large
  287.      (>504Mb) disks even on old machines (pre-1994 BIOS). It can also
  288.      handle large disks on BIOS's which do support LBA, whether or not
  289.      LBA is enabled.
  290.  
  291.      It is vital that ALL the OS's view each disk as having the same
  292.      geometry - this is because the numbers in the partition table are
  293.      "perceived" cylinder numbers, not the actual ones. Therefore, changing
  294.      the BIOS setting to activate LBA will invalidate the existing contents
  295.      of a disk.
  296.  
  297.      If your linux system does not "see" the "correct" geometry (that is,
  298.      the same that DOS "sees"), you will need to add a line to lilo.conf
  299.      append="hd=x,y,z"  where x,y,z represent the disk geometry (see the
  300.      relevant man pages).
  301.      
  302.   Q: My BIOS only holds information on two HDDs, not four. Does this
  303.      matter?
  304.   A: Maybe! Having 4 HDDs with old BIOS's under DOS required the use of 
  305.      driver software. Newer BIOS's hold information on 4 HDDs.
  306.  
  307.      Linux can happily use 4 HDDs even with most of these older BIOS's,
  308.      but if you put a DOS partition on disk 3 you will only be able to
  309.      access it via linux.
  310.  
  311.      This is relevant since many machines have an IDE drive, an IDE
  312.      CD-ROM and, if you want to implement this document, another IDE
  313.      drive too.
  314.  
  315.  
  316.  
  317.      If you have found this document useful, please let me know.
  318.  
  319.